home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’93 / SCSIPatch / dcmds / stop_scsi_record.c < prev   
Encoding:
C/C++ Source or Header  |  1992-06-14  |  1.3 KB  |  53 lines  |  [TEXT/MPS ]

  1. /*
  2.     stop_scsi_record.c
  3.         Copyright Paul Baxter
  4.  
  5.    The following MPW commands will build the dcmd and copy it to the
  6.    "Debugger Prefs" file in the System folder. The dcmd's name in
  7.    MacsBug will be the name of the file built by the Linker.
  8.  
  9.    You must have the following object files in the "{Libraries}" directory:
  10.    dcmdGlue.a.o DRuntime.o put.c.o 
  11.    You must also have the folowing header files in the "{CIncludes}" directory:
  12.    dcmd.h put.h
  13.  
  14.            C stop_scsi_record.c
  15.         Link "{Libraries}"dcmdGlue.a.o stop_scsi_record.c.o "{Libraries}"patchlib.a.o "{Libraries}"DRuntime.o  -o ScsiStopRecord
  16.         BuildDcmd ScsiStopRecord 102
  17.         Echo 'include "ScsiStopRecord";'    |    Rez -a -o "{systemFolder}Debugger Prefs"
  18. */
  19.  
  20. #include <Types.h>
  21. #include <Errors.h>
  22. #include <dcmd.h>
  23. #include <Patch.h>
  24.  
  25. pascal void CommandEntry (dcmdBlock* paramPtr)
  26. {
  27.     OSErr err;
  28.     
  29.     switch (paramPtr->request)
  30.         {
  31.         case dcmdInit:
  32.             break;
  33.  
  34.         case dcmdHelp:
  35.             dcmdDrawLine ("\pScsiStopRecord");
  36.             dcmdDrawLine ("\p  Stop Recording SCSI calls.");
  37.             break;
  38.  
  39.         case dcmdDoIt:
  40.             err = SCSISTOPRECORD();
  41.             if (err == unimpErr) {
  42.                 dcmdDrawLine ("\pSCSI Patch not Installed.");
  43.             }
  44.             else {
  45.                 dcmdDrawLine ("\pRecording SCSI calls is now off.");
  46.                 if (err != 0) {
  47.                     dcmdDrawLine ("\pWarning Record Buffer Full.");
  48.                 }
  49.             }
  50.             break;
  51.         }
  52. } // CommandEntry
  53.